from starlette_admin import EnumField
from starlette_admin.contrib.sqla import ModelView

from src.application.user.enums import LangCode


class UserView(ModelView):
    fields = [
        "id",
        "telegram_id",
        "username",
        "is_banned",
        "is_registered",
        "balance",
        "email",
        "orders",
        "proxies",
        "allowed_ips",
        "payments",
        EnumField("lang_code", enum=LangCode, select2=False),
        "test_proxy_acquired",
        "was_registered",
    ]
